package com.hkemmm.company;

public class Chef extends People{
    private String degree;
    private int salary;

    //构造函数
    public Chef(int age, String sex, String name, String degree, int salary) {
        super(age, sex, name);
        this.degree = degree;
        this.salary = salary;
    }

    //属性getter方法
    public String getDegree() {
        return degree;
    }

    public int getSalary() {
        return salary;
    }

    //属性setter方法
    public void setDegree(String degree) {
        this.degree = degree;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }

    @Override
    public void skill() {
        System.out.println(super.getName() + "学会了做饭！！");
    }
}
